package com.zn.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by yinjinwei on 2018/7/14.
 * k线对象
 */
public class KLineEntity {
    private String code;  //rb1810
    private String open;
    private String close;
    private String high;
    private String low;
    private String volume;
    private String tradeAmt;
    private String positionNum;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date curTime;
    private String avgPrc;//当前成交均价（平均值）
    //数据的创建时间
    private String createTime;
    private String instrumentMonth;

    public KLineEntity() {
    }

    public KLineEntity(KLineEntity kLineEntity) {
        this.code = kLineEntity.getCode();
        this.open = kLineEntity.getOpen();
        this.close = kLineEntity.getClose();
        this.high = kLineEntity.getHigh();
        this.low = kLineEntity.getLow();
        this.volume = kLineEntity.getVolume();
        this.tradeAmt = kLineEntity.getTradeAmt();
        this.positionNum = kLineEntity.getPositionNum();
        this.curTime = kLineEntity.getCurTime();
        this.avgPrc = kLineEntity.getAvgPrc();
        this.createTime = kLineEntity.getCreateTime();
        this.instrumentMonth = kLineEntity.getInstrumentMonth();
    }



    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getOpen() {
        return open;
    }

    public void setOpen(String open) {
        this.open = open;
    }

    public String getClose() {
        return close;
    }

    public void setClose(String close) {
        this.close = close;
    }

    public String getHigh() {
        return high;
    }

    public void setHigh(String high) {
        this.high = high;
    }

    public String getLow() {
        return low;
    }

    public void setLow(String low) {
        this.low = low;
    }

    public String getVolume() {
        return volume;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public String getTradeAmt() {
        return tradeAmt;
    }

    public void setTradeAmt(String tradeAmt) {
        this.tradeAmt = tradeAmt;
    }

    public String getPositionNum() {
        return positionNum;
    }

    public void setPositionNum(String positionNum) {
        this.positionNum = positionNum;
    }

    public Date getCurTime() {
        return curTime;
    }

    public void setCurTime(Date curTime) {
        this.curTime = curTime;
    }

    public String getAvgPrc() {
        return avgPrc;
    }

    public void setAvgPrc(String avgPrc) {
        this.avgPrc = avgPrc;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getInstrumentMonth() {
        return instrumentMonth;
    }

    public void setInstrumentMonth(String instrumentMonth) {
        this.instrumentMonth = instrumentMonth;
    }

    @Override
    public String toString() {
        return "KLineEntity{" +
                "code='" + code + '\'' +
                ", open=" + open +
                ", close=" + close +
                ", high=" + high +
                ", low=" + low +
                ", volume=" + volume +
                ", tradeAmt=" + tradeAmt +
                ", positionNum=" + positionNum +
                ", curTime=" + curTime +
                ", avgPrc=" + avgPrc +
                ", createTime='" + createTime + '\'' +
                ", instrumentMonth='" + instrumentMonth + '\'' +
                '}';
    }
}
